1. Field of the Invention
The present invention relates to an electronic device and a method for scanning a touch panel thereof. More particularly, the present invention relates to charging the touch sensors of the touch panel in the aforementioned scanning.
2. Description of the Related Art
FIG. 1 is a schematic diagram showing a conventional electronic device 100 including a touch controller 120 and a touch panel 140, which is a capacitive touch panel. The touch panel 140 includes a set of driving lines (the vertical lines) and a set of sensing lines (the horizontal lines). Each location where a driving line crosses a sensing line is a touch sensor of the touch panel 140. For example, three touch sensors of the touch panel 140 are marked as 142, 144 and 146, respectively.
When a user performs some operations on the touch panel 140, the touch controller 120 can detect resultant touch events by scanning the touch panel 140. For scanning of the touch panel 140, the touch controller 120 sends driving signals to the driving lines of the touch panel 140. The driving signals charges the touch sensors of the touch panel 140 and the touch sensors generate sensing signals in response. Next, the touch controller 120 receives the sensing signals from the sensing lines of the touch panel 140. The touch controller 120 analyzes the sensing signals to determine the locations of the touch events. The electronic device 100 may perform predetermined functions according to the touch events.
In the scanning of a touch panel, noises often affect the sensing signals and cause erroneous results of the detection of touch events. The noise is always a problem. For example, many electronic devices, such as smart phones and tablet computers, are equipped with touch displays that consist of touch panels and liquid crystal modules (LCMs). An LCM generates a lot of noises when the polarities of its pixels are inverted.
Another conventional problem is the different charge times of the touch sensors of a touch panel. The equivalent resistances and equivalent capacitances of the touch sensors of a touch panel are not uniform, which means the charge characteristics of the touch sensors are not uniform, either. FIG. 2 is a schematic diagram showing the curves 202, 204 and 206 of the voltage-time characteristics of the charging of the touch sensors 142, 144 and 146 of the conventional touch panel 140, respectively. As shown in FIG. 2, a far-end touch sensor such as the touch sensor 146 charges slower than a near-end touch sensor such as the touch sensor 142 charges because the far-end touch sensor has a larger time constant. Here the time constant of a touch sensor is the product of the equivalent resistance and the equivalent capacitance of the touch sensor. Ideally, in the scanning of the touch panel 140, all touch sensors are required to charge to the voltage level VR. The near-end touch sensor 142 takes a period TN to charge to the voltage level VR, while the far-end touch sensor 146 takes a much longer period TF to charge to the voltage level VR.
However, the touch sensors of a conventional touch panel are all charged according to the same charge period, which might cause undercharge or overcharge of the touch sensors. For example, the touch sensors 144 and 146 are undercharged when all the touch sensors are charged according to the charge period TN, while the touch sensors 142 and 144 are overcharged when all the touch sensors are charged according to the charge period TF.